#pragma once
#include "CopyConverter.h"
#include "FileHandler.h"
#include <vector>

enum CopyMode
{
	kWysiwyg = 0,
	kAsHexDigits,
	kAsCStyleAscii,
	kAsUtf8,
	kAsUtf16LE,
	kAsUtf16BE
};

class Copier
{
	CopyConverter* mCopyConverterPtr;
	LONGLONG mRangeBegin;
	LONGLONG mRangeEnd;
	LONGLONG mCurrentAddress;

	HWND mMainWindow;
	
public:
	Copier();
	~Copier();

	void SetMainWindow(HWND);
	void SetRange(LONGLONG begin, LONGLONG end);
	bool PrepareStart(CopyMode);
	void Continue(FileHandler&);
	float GetPercentageDone() const;
	void Finish(HWND ownerWindow);
	void Cancel();

	bool IsDataReady() const;
	bool IsCopying() const;

private:
	bool DialogContinueWithBigData(LONGLONG length);
};

